﻿namespace Present.Commands.Async.Actions
{
    /// <summary>
    /// An action that needs no pre processing
    /// </summary>
    /// <typeparam name="TParameter"></typeparam>
    /// <typeparam name="TResult"></typeparam>
    public abstract class SimpleAsyncAction<TParameter, TResult> : AsyncAction<TParameter, TResult>
    {

        public override TResult DoWork(ActionExecution<TParameter> args)
        {
            return DoWorkSimple(args.Parameter);
        }

        protected abstract TResult DoWorkSimple(TParameter parameter);
    }
}